package com.newgoldcurrency.utils.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class SqliteHelper extends SQLiteOpenHelper {
    public SqliteHelper(@Nullable Context context) {
        super(context, "data.db", null, 2);
    }
    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("create table CHAT (objectId integer primary key autoincrement, " +
                " fromId varchar(100)," +
                " ownerId varchar(100)," +
                " toId varchar(100)," +
                " timestamp varchar(100)," +
                " content varchar(255))");

        db.execSQL("create table USER (objectId integer primary key autoincrement, " +
                " mail varchar(100)," +
                " verify boolean)");
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int i, int i1) {
    }
}

